import React, { useState } from 'react'
import { Button, Space, Swiper, Toast } from 'antd-mobile'
import { CapsuleTabs } from 'antd-mobile'
import { CalendarPickerView } from 'antd-mobile'
function Index() {
    let [flag,setFlag]=useState(false)

    //列表渲染

   const list=[
    {
    title:'123',
    price:999,
    img:'https://img2.baidu.com/it/u=4134403333,3645183273&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1740762000&t=74cfe93cc007cff0c2941256116a0b39'
    },
    {
    title:'123',
    price:999,
    img:'https://img2.baidu.com/it/u=4134403333,3645183273&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1740762000&t=74cfe93cc007cff0c2941256116a0b39'
    },
    {
    title:'123',
    price:999,
    img:'https://img2.baidu.com/it/u=4134403333,3645183273&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1740762000&t=74cfe93cc007cff0c2941256116a0b39'
    },
    {
    title:'123',
    price:999,
    img:'https://img2.baidu.com/it/u=4134403333,3645183273&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1740762000&t=74cfe93cc007cff0c2941256116a0b39'
    },
   ]
  return (
    <div>
        {/* 轮播图 */}
        <Swiper autoplay >
            <Swiper.Item style={{width:'100vw',height:'40vw',background:'pink'}}></Swiper.Item>
            <Swiper.Item style={{width:'100vw',height:'40vw',background:'blue'}}></Swiper.Item>
            <Swiper.Item style={{width:'100vw',height:'40vw',background:'yellow'}}></Swiper.Item>
            <Swiper.Item style={{width:'100vw',height:'40vw',background:'red'}}></Swiper.Item>
        </Swiper>
        <h2>2025/2/27</h2>
    
        <div onClick={!flag}><CalendarPickerView /></div>
        
        
        <CapsuleTabs>
          <CapsuleTabs.Tab title='机票' key='fruits'>
            机票
          </CapsuleTabs.Tab>
          <CapsuleTabs.Tab title='国内火车票' key='vegetables'>
            国内火车票
          </CapsuleTabs.Tab>
          
        </CapsuleTabs>
        {
            list.map((v,i)=>{
            return  <div key={i}>
              <p>{v.title}</p>
              <p>{v.price}</p>
              <img src={v.img} alt="" style={{wight:'30vw',height:'30vh'}}/>
            </div>
            })
        }
    </div>
  )
}

export default Index